home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
CUJ9206.ARJ
/
1006026A
< prev
next >
Wrap
Text File
|
1992-06-02
|
893b
|
39 lines
// TESTLOCK.C
//
//
// TESTLOCK is calls FAKELOCK to learn the return values it
// will create. By writing down the input string and the return
// value they can be added to your program like they are in TESTPROG.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "fakelock.h"
void main( void )
{
char instr[96]; // input string
char *mesg = "\rEnter string to test FAKELOCK (empty string to end): ";
int key; // which lock to use
int results; // return value from FAKELOCK
char temp[96]; // tempory place to get which lock
printf( mesg );
gets( instr );
while ( strlen( instr ) > 0 )
{
printf("Which lock (1 or 2): ");
gets( temp );
key = atoi( temp );
results = FAKELOCK( instr, key );
printf("FAKELOCK results : %d\n", results );
printf( mesg );
gets( instr );
}
}